package com.sky.demo.date;

import cn.hutool.core.date.DateUtil;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

public class LocalDate_demo {


    public static void main(String[] args) {


        LocalDate date = LocalDate.now();

        int month = date.getMonthValue();
        System.out.println("month: " + month);

        int today = date.getDayOfMonth();
        System.out.println("today: " + today);


        date = date.minusDays(today - 1);
        System.out.println(date.format(DateTimeFormatter.ISO_LOCAL_DATE));
    }
}
